package com.xltt.vehicleControl.bean;

import java.io.Serializable;

/**
 * @author zhaotengfei
 * @version 1.0.0
 * @created 2017/4/20 17:22
 */

public class MaintenanceStatus implements Serializable {
    public static final int TYRE_NORMAL = 0;
    public static final int TYRE_LOW_RESERVE = 1;
    public static final int TYRE_LOW = 2;
    public static final int TYRE_RESERVE = 3;
    private MainBatteryStatus mainBatteryStatus;
    private Float tyreStatusDriver;
    private Float tyreStatusPassenger;
    private Float tyreStatusDriverRear;
    private Float tyreStatusPassengerRear;
    private Integer tyrePreWarningDriver;
    private Integer tyrePreWarningPassenger;
    private Integer tyrePreWarningDriverRear;
    private Integer tyrePreWarningPassengerRear;
    //保养提醒按发动机运行时间计时
    private Integer engineHrsToService;
    //剩余保养里程
    private Integer distanceToService;
    private Integer daysToService;
    private Integer serviceWarningStatus;
    //需要保养的原因保养提醒触发(CALENDAR = 0DISTANCE = 1ENGINEHOURS = 2ENGINEREQUEST = 3unknown =7)
    private Integer serviceWarningTrigger;
    private Float odometer;
    private Integer brakeFluidLevelStatus;
    private Integer washerFluidLevelStatus;


	//以下为v2新添
    //v2左前轮胎温度
    private String tyreTempDriver;
    //右前轮胎温度
    private String tyreTempPassenger;
    //左后轮胎温度
    private String tyreTempDriverRear;
    //右后轮胎温度
    private String tyreTempPassengerRear;
    //左前轮胎温度告警(0:Normal 1：warning)
    private String tyreTempWarningDriver;
    //右前轮胎温度告警
    private String tyreTempWarningPassenger;
    //左后轮胎温度告警
    private String tyreTempWarningDriverRear;
    //右后轮胎温度告警
    private String tyreTempWarningPassengerRear;
    //行驶高分辨率
    private String trvlDistance;


    public MaintenanceStatus() {
    }

    public void setMainBatteryStatus(MainBatteryStatus mainBatteryStatus) {
        this.mainBatteryStatus = mainBatteryStatus;
    }

    public void setTyreStatusDriver(Float tyreStatusDriver) {
        this.tyreStatusDriver = tyreStatusDriver;
    }

    public void setTyreStatusPassenger(Float tyreStatusPassenger) {
        this.tyreStatusPassenger = tyreStatusPassenger;
    }

    public void setTyreStatusDriverRear(Float tyreStatusDriverRear) {
        this.tyreStatusDriverRear = tyreStatusDriverRear;
    }

    public void setTyreStatusPassengerRear(Float tyreStatusPassengerRear) {
        this.tyreStatusPassengerRear = tyreStatusPassengerRear;
    }

    public void setTyrePreWarningDriver(Integer tyrePreWarningDriver) {
        this.tyrePreWarningDriver = tyrePreWarningDriver;
    }

    public void setTyrePreWarningPassenger(Integer tyrePreWarningPassenger) {
        this.tyrePreWarningPassenger = tyrePreWarningPassenger;
    }

    public void setTyrePreWarningDriverRear(Integer tyrePreWarningDriverRear) {
        this.tyrePreWarningDriverRear = tyrePreWarningDriverRear;
    }

    public void setTyrePreWarningPassengerRear(Integer tyrePreWarningPassengerRear) {
        this.tyrePreWarningPassengerRear = tyrePreWarningPassengerRear;
    }

    public void setEngineHrsToService(Integer engineHrsToService) {
        this.engineHrsToService = engineHrsToService;
    }

    public void setDistanceToService(Integer distanceToService) {
        this.distanceToService = distanceToService;
    }

    public void setDaysToService(Integer daysToService) {
        this.daysToService = daysToService;
    }

    public void setServiceWarningStatus(Integer serviceWarningStatus) {
        this.serviceWarningStatus = serviceWarningStatus;
    }

    public void setServiceWarningTrigger(Integer serviceWarningTrigger) {
        this.serviceWarningTrigger = serviceWarningTrigger;
    }

    public void setOdometer(Float odometer) {
        this.odometer = odometer;
    }

    public void setBrakeFluidLevelStatus(Integer brakeFluidLevelStatus) {
        this.brakeFluidLevelStatus = brakeFluidLevelStatus;
    }

    public void setWasherFluidLevelStatus(Integer washerFluidLevelStatus) {
        this.washerFluidLevelStatus = washerFluidLevelStatus;
    }

    public MainBatteryStatus getMainBatteryStatus() {
        return this.mainBatteryStatus;
    }

    public Float getTyreStatusDriver() {
        return this.tyreStatusDriver;
    }

    public Float getTyreStatusPassenger() {
        return this.tyreStatusPassenger;
    }

    public Float getTyreStatusDriverRear() {
        return this.tyreStatusDriverRear;
    }

    public Float getTyreStatusPassengerRear() {
        return this.tyreStatusPassengerRear;
    }

    public Integer getTyrePreWarningDriver() {
        return this.tyrePreWarningDriver;
    }

    public Integer getTyrePreWarningPassenger() {
        return this.tyrePreWarningPassenger;
    }

    public Integer getTyrePreWarningDriverRear() {
        return this.tyrePreWarningDriverRear;
    }

    public Integer getTyrePreWarningPassengerRear() {
        return this.tyrePreWarningPassengerRear;
    }

    public Integer getEngineHrsToService() {
        return this.engineHrsToService;
    }

    public Integer getDistanceToService() {
        return this.distanceToService;
    }

    public Integer getDaysToService() {
        return this.daysToService;
    }

    public Integer getServiceWarningStatus() {
        return this.serviceWarningStatus;
    }

    public Integer getServiceWarningTrigger() {
        return this.serviceWarningTrigger;
    }

    public Integer getOdometer() {
        return odometer != null ? (int) odometer.floatValue() : null;
    }

    public Integer getBrakeFluidLevelStatus() {
        return this.brakeFluidLevelStatus;
    }

    public Integer getWasherFluidLevelStatus() {
        return this.washerFluidLevelStatus;
    }

    public String getTyreTempDriver() {
        return tyreTempDriver;
    }

    public void setTyreTempDriver(String tyreTempDriver) {
        this.tyreTempDriver = tyreTempDriver;
    }

    public String getTyreTempPassenger() {
        return tyreTempPassenger;
    }

    public void setTyreTempPassenger(String tyreTempPassenger) {
        this.tyreTempPassenger = tyreTempPassenger;
    }

    public String getTyreTempDriverRear() {
        return tyreTempDriverRear;
    }

    public void setTyreTempDriverRear(String tyreTempDriverRear) {
        this.tyreTempDriverRear = tyreTempDriverRear;
    }

    public String getTyreTempPassengerRear() {
        return tyreTempPassengerRear;
    }

    public void setTyreTempPassengerRear(String tyreTempPassengerRear) {
        this.tyreTempPassengerRear = tyreTempPassengerRear;
    }

    public String getTyreTempWarningDriver() {
        return tyreTempWarningDriver;
    }

    public void setTyreTempWarningDriver(String tyreTempWarningDriver) {
        this.tyreTempWarningDriver = tyreTempWarningDriver;
    }

    public String getTyreTempWarningPassenger() {
        return tyreTempWarningPassenger;
    }

    public void setTyreTempWarningPassenger(String tyreTempWarningPassenger) {
        this.tyreTempWarningPassenger = tyreTempWarningPassenger;
    }

    public String getTyreTempWarningDriverRear() {
        return tyreTempWarningDriverRear;
    }

    public void setTyreTempWarningDriverRear(String tyreTempWarningDriverRear) {
        this.tyreTempWarningDriverRear = tyreTempWarningDriverRear;
    }

    public String getTyreTempWarningPassengerRear() {
        return tyreTempWarningPassengerRear;
    }

    public void setTyreTempWarningPassengerRear(String tyreTempWarningPassengerRear) {
        this.tyreTempWarningPassengerRear = tyreTempWarningPassengerRear;
    }

    public String getTrvlDistance() {
        return trvlDistance;
    }

    public void setTrvlDistance(String trvlDistance) {
        this.trvlDistance = trvlDistance;
    }

    public static boolean isTyreNormal(Integer tyrePreWarning) {
        return tyrePreWarning != null && 0 == tyrePreWarning.intValue();
    }

    public static class MainBatteryStatus implements Serializable {
        private Integer stateOfCharge;
        private String stateOfHealth;
        private Float voltage;
        public static final int STATE_NORMAL = 0;
        public static final int STATE_WARNING = 1;

        public MainBatteryStatus() {
        }

        public void setStateOfCharge(Integer stateOfCharge) {
            this.stateOfCharge = stateOfCharge;
        }

        public void setStateOfHealth(String stateOfHealth) {
            this.stateOfHealth = stateOfHealth;
        }

        public void setVoltage(Float voltage) {
            this.voltage = voltage;
        }

        public Integer getStateOfCharge() {
            return this.stateOfCharge;
        }

        public String getStateOfHealth() {
            return this.stateOfHealth;
        }

        public Float getVoltage() {
            return this.voltage;
        }

        public boolean isBatteryNormal() {
            return this.stateOfCharge == null || this.stateOfCharge.intValue() == 0 || this.stateOfCharge.intValue() < 0;
        }
    }
}
